#define  _CRT_SECURE_NO_WARNINGS 1

#include "Sort.h"

void TestInsert()
{
	int arr[] = { 8,9,6,3,5,7,4,12,5,6,8,5,8,9,6,3,5,7,4,12,5,6,8,5,8,9,6,3,5,7,4,12,5,6,8,5 };
	int nums = sizeof(arr) / sizeof(arr[0]);
	PrintArray(arr, nums);
	InsertSort(arr, nums);
	PrintArray(arr, nums);

}

void TestShell()
{
	int arr[] = { 8,9,6,3,5,7,4,12,5,6,8,5,8,9,6,3,5,7,4,12,5,6,8,5,8,9,6,3,5,7,4,12,5,6,8,5 };
	int nums = sizeof(arr) / sizeof(arr[0]);
	PrintArray(arr, nums);
	ShellSort(arr, nums);
	PrintArray(arr, nums);
}

void TestHeap()
{
	int arr[] = { 8,9,6,3,5,7,4,12,5,6,8,5,8,9,6,3,5,7,4,12,5,6,8,5,8,9,6,3,5,7,4,12,5,6,8,5 };
	int nums = sizeof(arr) / sizeof(arr[0]);
	PrintArray(arr, nums);
	
	HeapSort(arr, nums);
	PrintArray(arr, nums);
}

void TestSelect()
{
	int arr[] = { 20,9,6,3,5,7,4,12,5,6,8,5,8,9,6,3,5,7,4,12,5,6,8,5,8,9,6,3,5,7,4,12,5,6,8,5 };
	int nums = sizeof(arr) / sizeof(arr[0]);
	PrintArray(arr, nums);

	SelectSort(arr, nums);
	PrintArray(arr, nums);

}

int main()
{
	//TestInsert();
	//TestShell();
	//TestHeap();
	TestSelect();

	return 0;
}